package com.cmdi.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

/**
 * @Description: 登录结果
 * @Author: gaozb
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "登录结果")
public class LoginResult {
    /**
     * 登录成功的token，来自授权认证管理器auth
     */
    @ApiModelProperty(value = "登录成功的token")
    private String token ;

    /**
     * 登录成功的refresh_token，来自授权认证管理器auth
     */
    @ApiModelProperty(value = "登录成功的token")
    private String refreshToken ;

    /**
     * 该用户的菜单数据
     */
    @ApiModelProperty(value = "该用户的菜单数据")
    private List<SysMenu> menus ;

    /**
     * 该用户的权限数据
     */
    @ApiModelProperty(value = "该用户的权限数据")
    private List<SimpleGrantedAuthority> authorities ;

    /**
     * 该用户的个人信息
     */
    @ApiModelProperty(value = "该用户的个人")
    private SysUser personInfo;

    /**
     * token过期时间
     */
    @ApiModelProperty(value = "token过期时间")
    private Long timeEx;

}